# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy


class TicketPlistItem(scrapy.Item):
    # 产品列表
    product_list_table = scrapy.Field()  #产品列表 表
    data_type = scrapy.Field()  # 数据类型
    ids = scrapy.Field()  # 编号
    company_code = scrapy.Field()  # 公司编码
    platform_code = scrapy.Field()  # 操作平台WAP，PC
    city_code = scrapy.Field()  # 城市编码
    scenery_name = scrapy.Field()  # 景点名称
    product_id = scrapy.Field()  # 产品id
    detail_url = scrapy.Field()  # 详情页链接
    deal_flag = scrapy.Field()  # 处理标识
    create_time = scrapy.Field()  # 创建时间
    update_time = scrapy.Field()  # 更新时间
    task_id = scrapy.Field()  # 任务编号
    task_date = scrapy.Field()  # 任务时间


class TicketDetailItem(scrapy.Item):
    type = scrapy.Field()  # ticket或者hotel或者task
    timer_param = scrapy.Field()  # 定时器参数
    timer_granularity = scrapy.Field()  # 任务细分粒度
    business_type = scrapy.Field()  # 业务类型(ticket或者hotel)
    # 产品详情
    product_table = scrapy.Field()  # 产品表
    data_type = scrapy.Field()  # 数据类型
    detail_id = scrapy.Field()  # 详情编号
    company_code = scrapy.Field()  # 公司编码
    platform_code = scrapy.Field()  # 操作平台WAP，PC
    city_code = scrapy.Field()  # 城市编码
    scenery_name = scrapy.Field()  # 景点名称
    scenery_addr = scrapy.Field()  # 景点地址
    product_id = scrapy.Field()  # 产品id
    detail_url = scrapy.Field()  # 详情页链接
    lowest_price = scrapy.Field()  # 最低价
    score = scrapy.Field()  # 评分
    image_num = scrapy.Field()  # 详情图片量
    introduction = scrapy.Field()  # 使用说明
    score_tag = scrapy.Field()  # 评分标签，印象
    star_level = scrapy.Field()  # 星级
    create_time = scrapy.Field()  # 插入时间
    update_time = scrapy.Field()  # 操作时间
    task_id = scrapy.Field()  # 任务编号
    task_date = scrapy.Field()  # 任务时间
    snapshot_addr = scrapy.Field()  # 快照地址
    lv_product_id = scrapy.Field()  # 驴妈妈产品ID
    # 商品详情
    commodity_table = scrapy.Field()  # 商品表
    commodity_type = scrapy.Field()  # 商品类型或名称
    commodity_id = scrapy.Field()  # 商品id
    commodity_name = scrapy.Field()  # 商品名称
    commodity_url = scrapy.Field()  # 商品预定url
    sale_cond = scrapy.Field()  # 提前时间、销售条件
    refund_cond = scrapy.Field()  # 退改条件
    rack_rate = scrapy.Field()  # 门市价
    sale_price = scrapy.Field()  # 售价
    preferential = scrapy.Field()  # 优惠
    price_list_id = scrapy.Field()  # 时间价格表


class HotelDetailItem(scrapy.Item):
    # 产品信息
    type = scrapy.Field()  # ticket或者hotel或者task
    timer_param = scrapy.Field()  # 定时器参数
    timer_granularity = scrapy.Field()  # 任务细分粒度
    business_type = scrapy.Field()  # 业务类型(ticket或者hotel)
    # 产品详情
    product_table = scrapy.Field()  # 产品表
    data_type = scrapy.Field()  # 数据类型
    detail_id = scrapy.Field()  # 详情编号
    product_id = scrapy.Field()  # 产品id
    company_code = scrapy.Field()  # 公司编码
    platform_code = scrapy.Field()  # 操作平台WAP，PC
    city_code = scrapy.Field()  # 城市编码
    hotel_name = scrapy.Field()  # 酒店名称
    product_id = scrapy.Field()  # 产品id
    # hotel_url = scrapy.Field()  # 酒店链接
    come_date = scrapy.Field()  # 到店时间
    leave_date = scrapy.Field()  # 离店时间
    hotel_addr = scrapy.Field()  # 酒店地址
    lowest_price = scrapy.Field()  # 最低价
    score = scrapy.Field()  # 评分
    image_num = scrapy.Field()  # 详情图片量
    introduction = scrapy.Field()  # 使用说明
    sale_count = scrapy.Field()  # 销量
    score_tag = scrapy.Field()  # 评分标签，印象
    star_level = scrapy.Field()  # 星级
    detail_url = scrapy.Field()  # 详情页链接
    snapshot_addr = scrapy.Field()  # 快照地址
    lv_product_id = scrapy.Field()  # 驴妈妈产品ID
    create_time = scrapy.Field()  # 插入时间
    update_time = scrapy.Field()  # 更新时间
    task_id = scrapy.Field()  # 任务编号
    task_date = scrapy.Field()  # 任务时间

    # 商品详情
    # pid = scrapy.Field()  # 详情id
    commodity_table = scrapy.Field()  # 商品表
    room_type = scrapy.Field()  # 房型
    commodity_id = scrapy.Field()  # 商品id
    area = scrapy.Field()  # 房间面积
    floor = scrapy.Field()  # 楼层
    commodity_name = scrapy.Field()  # 商品名称
    bed_type = scrapy.Field()  # 床型
    broadband = scrapy.Field()  # 宽带
    breakfast = scrapy.Field()  # 早餐
    window = scrapy.Field()  # 窗户
    increase_bed = scrapy.Field()  # 加床
    people_num = scrapy.Field()  # 入住人数
    commodity_url = scrapy.Field()  # 商品预定链接
    product_id = scrapy.Field()  # 产品id
    cancel_rule = scrapy.Field()  # 取消(退订)规则
    preferential = scrapy.Field()  # 优惠
    sale_price = scrapy.Field()  # 售价
    price_list_id = scrapy.Field()  # 时间价格表